//
//  User.m
//  FNMenu
//
//  Created by 航汇聚科技 on 2018/9/7.
//  Copyright © 2018年 Yi Zhou. All rights reserved.
//

#import "User.h"

@implementation User

+ (BOOL)isLogin {
    if ([[self userID] intValue] != -1) {
        return YES;
    }
    return NO;
}

+ (BOOL)saveUserId:(NSString *)userId {
    [[NSUserDefaults standardUserDefaults] setValue:userId forKey:@"cookUserID"];
    return YES;
}

+ (NSString *)userID {
    NSString *userID = [[NSUserDefaults standardUserDefaults] valueForKey:@"cookUserID"];
    if (!userID) {
        userID = @"-1";
    }
    return userID;
}
@end
